module Simapse
  module AssetFury
    module IsThumbnails
      module ActMethods        
        # This is to be called in the thumb class (e.g : Image -> is_thumbs :from=>Asset ) 
        # the option :from tells from wich class the thumbs will the original file to be (re)generated
        def  is_thumbnails(options={})
          @@asset_class = options[:from] ||= self
          
          extend ClassMethods
          include InstanceMethods
          include InstanceFileMethods
          include Backgroundrb if options[:backgroundrb].eql?(true)
          before_save :file_sync
        end
       end #ActsMethods
       
      module ClassMethods
      end # ClassMethods
    
      module InstanceMethods

      end # InstanceMethods
      
      module InstanceFileMethods
      end
    end #HasAssets
  end #AssetFury
end #Simapse
  
  
        
#~ # return nil if it appears in a form
#~ def uploaded_thumb; nil; end

#~ # Possible use case : for content/type isn't thumbnailable (e.g : movie or music )
#~ def uploaded_thumb=(data)
  #~ @original_file = Simapse::File::TmpFile.new(:from_upload=>data)
#~ end